/* 
 * OMMS - Operations Management System
 * Custom CSS Styles
 */

/* Base Styles */
:root {
  --primary-color: #409EFF;
  --success-color: #67C23A;
  --warning-color: #E6A23C;
  --danger-color: #F56C6C;
  --info-color: #909399;
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --border-color: #DCDFE6;
  --border-light: #E4E7ED;
  --bg-color: #F5F7FA;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #f5f7fa;
}

/* Header */
.header-container {
  background-color: #409EFF;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo h1 {
  margin: 0;
  font-size: 24px;
  padding: 15px 0;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

/* Main Container */
.container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

h2, h3, h4 {
  color: #303133;
  margin-top: 20px;
  margin-bottom: 15px;
  font-weight: 500;
}

h2 {
  font-size: 1.8rem;
  border-bottom: 1px solid #ebeef5;
  padding-bottom: 10px;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.2rem;
}

p {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Card Styles */
.el-card {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05) !important;
  border: none !important;
  border-radius: 8px !important;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.el-card:hover {
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-3px);
}

.el-card__header {
  padding: 15px 20px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  font-weight: bold;
}

.el-card__body {
  padding: 20px !important;
}

/* JVM监控卡片特殊样式 */
.jvm-card {
  margin-bottom: 30px;
}

.jvm-card .el-tabs__header {
  margin-bottom: 15px;
}

/* 指标显示 */
.metric-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #ebeef5;
}

.metric-item:last-child {
  border-bottom: none;
}

.metric-label {
  font-weight: 500;
  color: #606266;
}

.metric-value {
  color: #409EFF;
}

/* 线程统计 */
.thread-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin: 20px 0;
}

.stat-item {
  text-align: center;
  padding: 15px;
  border-radius: 4px;
  background-color: #f5f7fa;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  min-width: 100px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #409EFF;
}

.stat-value-sm {
  font-size: 16px;
  font-weight: bold;
  color: #409EFF;
  margin-top: 5px;
}

.stat-detail {
  margin-top: 5px;
  font-size: 12px;
  color: #909399;
}

.stat-label {
  margin-top: 5px;
  font-size: 14px;
  color: #606266;
}

.stat-box {
  padding: 10px;
  border-radius: 4px;
  background-color: #f5f7fa;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.stat-box:hover {
  background-color: #eef5fe;
}

/* 进度条颜色 */
.el-progress-bar__inner.is-success {
  background-color: #67c23a;
}

.el-progress-bar__inner.is-warning {
  background-color: #e6a23c;
}

.el-progress-bar__inner.is-exception {
  background-color: #f56c6c;
}

/* 网络连通性卡片 */
.network-card {
  height: 100%;
}

.network-status {
  display: flex;
  justify-content: space-around;
  margin: 15px 0;
}

.network-status-item {
  text-align: center;
  padding: 15px;
  border-radius: 8px;
  background-color: #f5f7fa;
  width: 45%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.network-status-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.network-status-label {
  font-size: 14px;
  color: #606266;
  margin-bottom: 5px;
}

.network-status-value {
  font-size: 20px;
}

.success-icon {
  color: #67c23a;
}

.error-icon {
  color: #f56c6c;
}

.network-details {
  margin-top: 15px;
  padding: 15px;
  background-color: #f5f7fa;
  border-radius: 8px;
  font-size: 14px;
}

.network-details div {
  margin-bottom: 8px;
}

/* 工具按钮 */
.tool-btn {
  margin-right: 10px;
}

/* 表格样式优化 */
.el-table {
  border-radius: 6px;
  overflow: hidden;
}

.el-table th {
  background-color: #f5f7fa !important;
  color: #606266;
  font-weight: 600;
}

.el-table--striped .el-table__body tr.el-table__row--striped td {
  background-color: #fafafa;
}

/* 加载状态 */
.loading-container {
  text-align: center;
  padding: 40px 0;
}

.loading-container i {
  font-size: 32px;
  color: #409EFF;
  margin-bottom: 15px;
}

.loading-container p {
  color: #606266;
  font-size: 14px;
}

/* 内存使用卡片样式 */
.memory-usage-card {
  margin-top: 20px;
  padding: 15px;
  background-color: #f5f7fa;
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
}

.memory-info {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 14px;
  color: #606266;
}

/* 按钮样式优化 */
.el-button {
  border-radius: 4px;
  transition: all 0.3s;
}

.el-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.el-button--primary {
  background-color: #409EFF;
  border-color: #409EFF;
}

.el-button--success {
  background-color: #67c23a;
  border-color: #67c23a;
}

.el-button--warning {
  background-color: #e6a23c;
  border-color: #e6a23c;
}

.el-button--danger {
  background-color: #f56c6c;
  border-color: #f56c6c;
}

/* 标签样式优化 */
.el-tag {
  border-radius: 4px;
  padding: 0 8px;
  height: 24px;
  line-height: 22px;
  font-size: 12px;
}

/* 提示信息样式 */
.help-tip {
  margin-left: 5px;
  color: #909399;
  cursor: help;
}

/* 动画效果 */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .thread-stats {
    flex-wrap: wrap;
  }
  
  .stat-item {
    margin-bottom: 10px;
    width: 45%;
  }
  
  .header-container {
    flex-direction: column;
    padding: 10px;
  }
  
  .nav {
    width: 100%;
    justify-content: center;
  }
  
  .el-col-24 {
    width: 100% !important;
  }
  
  .network-status {
    flex-direction: column;
  }
  
  .network-status-item {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  background-color: white;
  border-top: 1px solid var(--border-light);
}

/* Utility Classes */
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-info { color: var(--info-color); }

.bg-primary { background-color: var(--primary-color); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-info { background-color: var(--info-color); }

.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; } 

/* 中间件监控卡片样式 */
.middleware-card {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.middleware-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.middleware-status-panel {
    padding: 10px;
    border-right: 1px solid #ebeef5;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Tab样式优化 */
.el-tabs--card > .el-tabs__header {
    margin-bottom: 15px;
    border-bottom: 1px solid #E4E7ED;
}

.el-tabs--card > .el-tabs__header .el-tabs__nav {
    border: none;
}

.el-tabs--card > .el-tabs__header .el-tabs__item {
    border: 1px solid #E4E7ED;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s cubic-bezier(.645,.045,.355,1);
    height: 36px;
    line-height: 36px;
    margin-right: 5px;
}

.el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
    background-color: #409EFF;
    color: #fff;
    border-color: #409EFF;
}

.el-tabs--card > .el-tabs__header .el-tabs__item:hover {
    color: #409EFF;
}

.el-tabs--card > .el-tabs__header .el-tabs__item.is-active:hover {
    color: #fff;
} 